<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>患者_评估书</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <link rel="stylesheet" type="text/css" href="../css/BasicPatientInformation.css" />
    <style>
        .aui-list-item-label {
            font-size: 0.6rem;
            text-align: right;
        }

        .tab-outer {
            width: 96%;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <main id="app">
        <div class="aui-padded-5" id="tab1-con">
            <div id="tab1-con1">
                <main id="app" class="tab-outer">
                    <div class="aui-content aui-margin-b-15">
                        <ul class="aui-list aui-form-list">
                            <li class="aui-list-item">
                                <div class="aui-list-item-label">
                                    生命体征：T <span style="padding: 0px 10px;" id="aaVsOne"></span> ℃
                                </div>
                                <div class="aui-list-item-label">
                                    生命体征：P <span style="padding: 0px 10px;" id="aaVsTwo"></span>次/分
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-label">
                                    生命体征：R <span style="padding: 0px 10px;" id="aaVsThree"></span> 次/分
                                </div>
                                <div class="aui-list-item-label">
                                    治疗评定：BP <span style="padding: 0px 10px;" id="aaVsFour"></span>mm/gg
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        入科方式：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaAdmissionType">
                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        既往史：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaPastHistory">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        传染病史：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaContagion">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        过敏史：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaAllergyHistory">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        意识：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaConsciousness">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        营养状况：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaNutrition">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        语言功能：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaLanguageAbility">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        自理评估：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaSelfAssessment">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        压疮：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaPressureSore">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        患者依从性：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaDependence">

                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label">
                                        心理：
                                    </div>
                                    <div class="aui-list-item-input aui-list-item-input-pinggu" id="aaPsychology">

                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </main>
            </div>

        </div>
    </main>
</body>
<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    var vm = null;
    apiready = function () {
        //接收患者ID
        var F_ID = api.pageParam.F_ID;

        vm = new Vue({
            el: '#app',
            data: {
                F_ID: 0, //患者唯一标识
            },
            created() {
                if (F_ID !== undefined && F_ID !== '') {
                    this.F_ID = F_ID;
                }
                //查询评估书
                getHoAdmissionAssessment(this.F_ID);
            }
        })
    }
    /**
     * 查询
     * @param currPage 当前页
     */
    function getHoAdmissionAssessment(F_ID) {
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        //定义toast提示框
        var toast = new auiToast();
        //查询评估信息
        var jsParms = new Object();
        //获取患者ID
        jsParms.aaTrId = F_ID;
        if (jsParms.aaTrId === '' || jsParms.aaTrId === undefined) {
            return "";
        }
        //转换为json数据
        var JsonStr = JSON.stringify(jsParms);
        /**
         * 请求控制器
         */
        $.ajax({
            url: Url_IP + '/businessmanagement/hoadmissionassessment/getHoAdmissionAssessment',
            type: 'post',
            async: false,
            contentType: "application/json",
            dataType: "json",
            data: JsonStr,
            success: function (result) {
                /**
                 * 验证返回信息是否为空
                 */
                if (result.success == true) {
                    /**
                     *  循环object
                     */
                    $.each(result.data.list, function (i, o) {
                        document.getElementById("aaVsOne").innerHTML = o.aaVsOne;
                        document.getElementById("aaVsTwo").innerHTML = o.aaVsTwo;
                        document.getElementById("aaVsThree").innerHTML = o.aaVsThree;
                        document.getElementById("aaVsFour").innerHTML = o.aaVsFour;
                        document.getElementById("aaAdmissionType").innerHTML = o.aaAdmissionType;
                        document.getElementById("aaPastHistory").innerHTML = o.aaPastHistory;
                        document.getElementById("aaContagion").innerHTML = o.aaContagion;
                        document.getElementById("aaAllergyHistory").innerHTML = o.aaAllergyHistory;
                        document.getElementById("aaConsciousness").innerHTML = o.aaConsciousness;
                        document.getElementById("aaNutrition").innerHTML = o.aaNutrition;
                        document.getElementById("aaLanguageAbility").innerHTML = o.aaLanguageAbility;
                        document.getElementById("aaSelfAssessment").innerHTML = o.aaSelfAssessment;
                        document.getElementById("aaPressureSore").innerHTML = o.aaPressureSore;
                        document.getElementById("aaDependence").innerHTML = o.aaDependence;
                        document.getElementById("aaPsychology").innerHTML = o.aaPsychology;
                        toast.success({
                            title: "加载成功",
                            duration: 2000
                        });
                    })
                } else {
                    /**
                     *  弹窗提示 暂无相关信息
                     */
                    toast.fail({
                        title: "加载失败",
                        duration: 2000
                    });
                }
            },
            error: function (result) {

                /**
                 *  提示错误信息
                 */
                toast.fail({
                    title: "加载失败",
                    duration: 2000
                });
            }
        });
    }

    //查询评估书
    function AssessmentBookDictionary(F_ID) {
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");


        //查询评估信息
        var EvaluationInformation = new Object();
        //获取患者ID
        EvaluationInformation.F_reserveId = F_ID;
        if (EvaluationInformation.F_reserveId === '' || EvaluationInformation.F_reserveId === undefined) {
            return "";
        }
        //转换为json数据
        var EvaluationJson = JSON.stringify(EvaluationInformation);
        api.ajax({
            url: Url_IP + 'HyperbaricOxygen/EntryEvaluation/AssessmentBookDictionary',
            method: 'post',
            data: {
                values: {
                    parms: EvaluationJson
                }
            }
        }, function (ret, err) {
            if (ret != "" && ret != null) {

            }
        });
    }
</script>
</html>